#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>
int main(){
pid_t p=getpid();
chdir("/");
FILE *f=fopen("test.txt","w");
if(f==NULL)
    printf("failure\n");
while(1)
    { printf("pid：%d\n",p);
        sleep(1);
    }
return 0;
}
